package service;

import dao.UserDao;
import model.User;

public class UserService {
    private UserDao userDao;

    public UserService(UserDao userDao) {
        this.userDao = userDao;
    }

    public boolean inspectUser(String username, String password) {
        User user = userDao.findUserByName(username);
        if (user != null || user.getPassword().equals(password)) {
            return true;
        }
        return false;
    }
}
